package com.wushi.lenovo.asia5b.app_model.h5;

import com.google.gson.annotations.SerializedName;
import com.mvp.base.model.BaseModel;
import com.wushi.lenovo.asia5b.app_model.wish.GoodsDetailModel;

/**
 * Created by zhangyuncai on 2018/11/27.
 */
public class H5GoodBean extends H5Bean {

    /**
     * do : buy_1
     * attr : 28320,28316
     * num : 1
     */


    private GoodsDetailModel goods;
    private String remark;
    private int num;
    private int quantity;
    private int is_buy_now;//是否立即购买  1,立即购买  0,加入购物车
    private String attr;
//    private List<AttrBean> multiple_attr;
    private String multiple_attr;
    private int prodId;//商品id

    public int getQuantity() {
        return quantity+num;
    }

    public int getProdId() {
        return prodId;
    }

    public String getRemark() {
        return remark;
    }

    public String getAttr() {
        return attr;
    }


    public int getNum() {
        return num;
    }

    public GoodsDetailModel getGoods() {
        return goods;
    }

    public int getIs_buy_now() {
        return is_buy_now;
    }

    public boolean isBuyNow() {
        return is_buy_now == 1;
    }

//    public List<AttrBean> getMultiple_attr() {
//        return multiple_attr;
//    }

    public String getMultiple_attr() {
        return multiple_attr;
    }

    public static class AttrBean extends BaseModel {
        private int quantity;
        @SerializedName(value = "option", alternate = {"options"})
        private String option;

        public int getQuantity() {
            return quantity;
        }

        public String getOption() {
            return option;
        }
    }
}
